/*
 * File name : MercuryLog.java
 * Created on : 2011-9-2 上午10:58:01
 * Creator : liuding
 */
package com.mercury.log;

/**
 * <pre>
 * Description : TODO
 * @author liuding
 * </pre>
 */
public interface MercuryLogger {

	/**
	 * Is the logger instance enabled for the DEBUG level?
	 * 
	 * @return True if this Logger is enabled for the DEBUG level, false
	 *         otherwise.
	 * 
	 */
	public boolean isDebugEnabled();

	/**
	 * Log a message at the DEBUG level.
	 * 
	 * @param msg
	 *            the message string to be logged
	 */
	public void debug(String msg);

	/**
	 * Log an exception (throwable) at the DEBUG level with an accompanying
	 * message.
	 * 
	 * @param msg
	 *            the message accompanying the exception
	 * @param t
	 *            the exception (throwable) to log
	 */
	public void debug(String msg, Throwable t);
	
	public void debug(String msg,Object param);
	public void debug(String msg,Object param1,Object param2);
	public void debug(String msg,Object[] paramArray);
	public void error(String msg,Object param);
	public void error(String msg,Object param1,Object param2);
	public void error(String msg,Object[] paramArray);
	public void info(String msg,Object param);
	public void info(String msg,Object param1,Object param2);
	public void info(String msg,Object[] paramArray);
	public void warn(String msg,Object param);
	public void warn(String msg,Object param1,Object param2);
	public void warn(String msg,Object[] paramArray);

	/**
	 * Is the logger instance enabled for the INFO level?
	 * 
	 * @return True if this Logger is enabled for the INFO level, false
	 *         otherwise.
	 */
	public boolean isInfoEnabled();

	/**
	 * Log a message at the INFO level.
	 * 
	 * @param msg
	 *            the message string to be logged
	 */
	public void info(String msg);

	/**
	 * Log an exception (throwable) at the INFO level with an accompanying
	 * message.
	 * 
	 * @param msg
	 *            the message accompanying the exception
	 * @param t
	 *            the exception (throwable) to log
	 */
	public void info(String msg, Throwable t);

	/**
	 * Is the logger instance enabled for the WARN level?
	 * 
	 * @return True if this Logger is enabled for the WARN level, false
	 *         otherwise.
	 */
	public boolean isWarnEnabled();

	/**
	 * Log a message at the WARN level.
	 * 
	 * @param msg
	 *            the message string to be logged
	 */
	public void warn(String msg);

	/**
	 * Log an exception (throwable) at the WARN level with an accompanying
	 * message.
	 * 
	 * @param msg
	 *            the message accompanying the exception
	 * @param t
	 *            the exception (throwable) to log
	 */
	public void warn(String msg, Throwable t);

	/**
	 * Is the logger instance enabled for the ERROR level?
	 * 
	 * @return True if this Logger is enabled for the ERROR level, false
	 *         otherwise.
	 */
	public boolean isErrorEnabled();

	/**
	 * Log a message at the ERROR level.
	 * 
	 * @param msg
	 *            the message string to be logged
	 */
	public void error(String msg);

	/**
	 * Log an exception (throwable) at the ERROR level with an accompanying
	 * message.
	 * 
	 * @param msg
	 *            the message accompanying the exception
	 * @param t
	 *            the exception (throwable) to log
	 */
	public void error(String msg, Throwable t);
	
	/**
	 * debug级别日志，格式化调试日志， 进入method的时候标记
	 * @param methodName
	 * @param params
	 */
	public void enterMethod(String methodName,Object... params);
	
	/**
	 * debug级别日志，格式化调试日志，进入method的时候标记
	 * @param methodName
	 * @param params
	 */
	public void exitMethod(String methodName,Object... params);
	
	/**
	 * debug级别日志，格式化调试日志，进入method的时候标记
	 * @param methodName
	 * @param params
	 */
	public void exitMethod(String methodName,long time,Object... params);
	
	public String getMethodParams(Object... params);
}
